package state;

/**
 * @author mubei
 * @date 2021/11/20
 * @description
 */
public class TestJoin implements Runnable{
    @Override
    public void run() {

        for (int i = 0; i < 100; i++) {
            System.out.println("vip来了"+i);
        }
    }


    public static void main(String[] args) throws InterruptedException {

        TestJoin testJoin = new TestJoin();
        Thread vip = new Thread(testJoin, "vip");

        vip.start();
        for (int i = 0; i < 1000; i++) {
            if(i == 200){
                vip.join();
            }
            System.out.println("main"+i);
        }
    }
}
